From 4830902b043f2a28d18bf611c5f9112cf885dd30 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roger=20Pau=20Monn=C3=A9?= Date: Fri, 17 Aug 2018 13:54:02 +0200 Subject: [PATCH] dom0/pvh: change the order of the MMCFG initialization MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit So it's done before the iommu is initialized. This is required in order to be able to fetch the MMCFG regions from the domain struct. No functional change. Signed-off-by: Roger Pau Monné Acked-by: Jan Beulich --- xen/arch/x86/hvm/dom0_build.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c index f0cd63b1ec..5065729106 100644 --- a/xen/arch/x86/hvm/dom0_build.c +++ b/xen/arch/x86/hvm/dom0_build.c @@ -1100,6 +1100,13 @@ int __init dom0_construct_pvh(struct domain *d, const module_t *image, return rc; } + /* + * NB: MMCFG initialization needs to be performed before iommu + * initialization so the iommu code can fetch the MMCFG regions used by the + * domain. + */ + pvh_setup_mmcfg(d); + iommu_hwdom_init(d); rc = pvh_load_kernel(d, image, image_headroom, initrd, bootstrap_map(image), @@ -1124,8 +1131,6 @@ int __init dom0_construct_pvh(struct domain *d, const module_t *image, return rc; } - pvh_setup_mmcfg(d); - printk("WARNING: PVH is an experimental mode with limited functionality\n"); return 0; } -- 2.30.2